﻿<Fluent:RibbonWindow  x:Class="SGT_OClient.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:Fluent="clr-namespace:Fluent;assembly=Fluent"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
       xmlns:toolkit="http://schemas.microsoft.com/wpf/2008/toolkit"
        xmlns:s="http://www.stemasoft.com/xaml"
         xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
        Title="Ingreso de remitos offline"
       ResizeMode="CanResizeWithGrip" 
        DataContext="{Binding Main, Source={StaticResource Locator}}" Icon="/SGT_OClient;component/Img/truck-icon.png">

    <Fluent:RibbonWindow.Resources>


        <Style x:Key="ClearButan" TargetType="Button">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Border Name="border"
                     Padding="4"
                     Background="transparent">
                            <Grid >
                                <ContentPresenter HorizontalAlignment="Center"
                                    VerticalAlignment="Center">
                                </ContentPresenter>
                            </Grid>
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>



     


        <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
    </Fluent:RibbonWindow.Resources>

    <DockPanel LastChildFill="True">
        <Fluent:Ribbon DockPanel.Dock="Top">
            <!--Quick Access Toolbar Items-->
            <Fluent:Ribbon.QuickAccessItems>
                <Fluent:QuickAccessMenuItem Target="{Binding ElementName=buttonGreen}"/>
            </Fluent:Ribbon.QuickAccessItems>

            <!--Tabs-->

            <Fluent:RibbonTabItem Header="Remitos" ReduceOrder="(P),(P),(P),(P),(P)" x:Name="RemitosTab" >
                <Fluent:RibbonGroupBox Header="" HorizontalContentAlignment="Center" HorizontalAlignment="Center">
                    <Fluent:Button LargeIcon="/SGT_OClient;component/Img/new_remito.png"  Header="Nuevo"  Command="{Binding IrANuevoRemitoEntrada}" />
                   
                </Fluent:RibbonGroupBox>
                <Fluent:RibbonGroupBox Header="Seleccionado" HorizontalContentAlignment="Center" HorizontalAlignment="Center">
                    <Fluent:Button LargeIcon="Img\Editar.png"  Header="Editar"  Command="{Binding Path=EditarRemito}" />
                    <Fluent:Button LargeIcon="Img\Eliminar.png"  Header="Eliminar"  Command="{Binding Path=EliminarRemito}" />
                </Fluent:RibbonGroupBox>



            </Fluent:RibbonTabItem>
            <Fluent:Ribbon.Menu>
                <Fluent:Backstage Header="Archivo" Background="#FF2BB13F">
                    <Fluent:BackstageTabControl>
                        <Fluent:Button Header="Nuevo remito" Command="{Binding IrANuevoRemitoEntrada}" Icon="Img\Blue.png"/>
                        <Fluent:Button Header="Salir" Command="{Binding ExitCommand}" Icon="Img\Blue.png"/>
                    </Fluent:BackstageTabControl>
                </Fluent:Backstage>
            </Fluent:Ribbon.Menu>
        </Fluent:Ribbon>
        <Fluent:StatusBar VerticalAlignment="Bottom"  DockPanel.Dock="Bottom" />
        
            <DataGrid AutoGenerateColumns="False" ItemsSource="{Binding Path=Remitos}" Style="{StaticResource PrettierDataGridStyle}" GridLinesVisibility="Horizontal" HorizontalGridLinesBrush="Gainsboro" RowHeaderWidth="0" VerticalContentAlignment="Stretch" SelectionMode="Single" SelectedItem="{Binding Path=RemitoSeleccionado}" CanUserAddRows="True" IsReadOnly="True">
                <DataGrid.Columns>

                <DataGridTextColumn Binding="{Binding Path=Numero_Remito_Carga}" Header="N° Remito" Width="80" IsReadOnly="True"/>
                <DataGridTextColumn Binding="{Binding Path=Numero_Remito}" Header="Remito Ext" Width="80" IsReadOnly="True"/>
                <DataGridTextColumn Binding="{Binding Path=Hora_Llegada}" Header="Llegada" Width="140" IsReadOnly="True"/>
                <DataGridTextColumn Binding="{Binding Path=Hora_Salida}" Header="Salida" Width="140" IsReadOnly="True"/>
                <DataGridTextColumn Binding="{Binding Path=Matricula_Camion}" Header="M. Camión" Width="Auto" IsReadOnly="True"/>
                <DataGridTextColumn Binding="{Binding Path=Peso_Bruto}" Header="Bruto 1" Width="70" IsReadOnly="True"/>
                <DataGridTextColumn Binding="{Binding Path=Peso_Bruto2}" Header="Bruto 2" Width="70" IsReadOnly="True"/>
                <DataGridTextColumn Binding="{Binding Path=Tara}" Header="Tara 1" Width="70" IsReadOnly="True"/>
                <DataGridTextColumn Binding="{Binding Path=Tara2}" Header="Tara 2" Width="70" IsReadOnly="True"/>
                <DataGridTextColumn Binding="{Binding Path=PesoNeto}" Header="Neto" Width="70" IsReadOnly="True"/>
                <DataGridTextColumn Binding="{Binding Path=Observaciones}" Header="Notas" Width="120*" IsReadOnly="True" />
            </DataGrid.Columns>
            </DataGrid>
		
       
            
     
    </DockPanel>
</Fluent:RibbonWindow>
